# -*- coding: utf-8 -*-
import pygal
from pygal.style import LightColorizedStyle as LCS, LightenStyle as LS

# 可视化
my_style = LS('#333366', base_style=LCS)
chart = pygal.Bar(style=my_style, x_label_rotation=45, show_legend=False)
chart.title = 'Python Projects'
chart.x_labels = ['sentry', 'linux-insides', 'Detectron']
plot_dicts = [
    {'value': 19501, 'label': 'Description of sentry'},
    {'value': 18867, 'label': 'Description of linux-insides'},
    {'value': 18766, 'label': 'Description of Detectron'}
]
chart.add('', plot_dicts)
chart.render_to_file('bar_descriptions.svg')
